package controllers

import (
	"github.com/astaxie/beego"
	"github.com/astaxie/beego/context"
	"softwareEngineering/models"
)

var FilterUser = func(ctx *context.Context) {
	u := ctx.Input.Session("user").(models.User)
	beego.Info("u", u)
	if u.Role == "普通用户" {
		ctx.Redirect(302, "/login")
	}
}
